<template>
  <div>
    <!-- 默认插槽给主组件传数据  :isShow="isShow" -->
    DComp<slot :isShow="isShow" />

    <slot name="slot4" :str="str" />
  </div>
</template>

<script>
export default {
  name: "DComp",
  data(){
    return {
      isShow: true,
      str:"abcd"
    }
  }
};

</script>

<style>

</style>